home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11010 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  964 b 

  1. Path: hal.COM!spike
  2. From: spike@hal.com (Spike White)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: help with bytes -> long
  5. Date: 11 Mar 1996 20:27:47 GMT
  6. Organization: HAL Computer Systems, Inc.
  7. Message-ID: <4i22c3$hes@news.hal.com>
  8. References: <4hl3mh$oue@frodo.smartlink.net>
  9. NNTP-Posting-Host: zarathustra.hal.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Thomas Hackbarth (thomash@warp10.smartlink.net) wrote:
  13. : I suck at bit manipulation. I need a macro to convert RGB to a long so I
  14. : get this output
  15.  
  16. : RED GREEN BLUE  -> LONG
  17. : FF   00    FF       FF 00 FF 00
  18.  
  19. : Using Windows RGB macro I get this
  20.  
  21. : RED GREEN BLUE  -> COLORREF
  22. : FF   00    FF       00 FF 00 FF
  23.  
  24. An obvious one is  (RGB & 0xFFFFFF) < 8.
  25.  
  26. --
  27. Spike White          | spike@hal.com               | Biker Nerds
  28. HaL Software Systems | '87 BMW K75S, DoD #1347     |  From  HaL
  29. Austin, TX           |  http://www.halsoft.com/users/spike/index.html 
  30. Disclaimer:  HaL, want me to speak for you?  No, Dave... 
  31.